<?php
namespace app\admin\model;

use think\Model;

class ClothmakingRecipeProducts extends Model
{
    protected $name = 'clothmaking_recipe_products';

    // 关联产品
    public function product()
    {
        return $this->belongsTo('Product', 'product_id');
    }

    // 关联配方
    public function recipe()
    {
        return $this->belongsTo('ClothmakingRecipe', 'recipe_id');
    }
}